package com.example.demo.service;

import com.example.demo.entity.AlterDemand;
import com.example.demo.entity.Demand;
import com.example.demo.mapper.DemandMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class DemandService {
    @Resource
    DemandMapper demandMapper;

    public int updateDemand(Demand demand) {
        return demandMapper.updateDemand(demand);
    }

    public List<Demand> pageQueryAll(int page, int size){
        List<Demand> Demand = demandMapper.pageQueryAll(page, size);
        return Demand;
    }

    public List<Demand> pageQueryUnbegin(int page, int size){
        List<Demand> Demand = demandMapper.pageQueryUnbegin(page, size);
        //
        return Demand;
    }

    public List<Demand> pageQueryBegin(int page, int size){
        List<Demand> Demand = demandMapper.pageQueryBegin(page, size);
        return Demand;
    }

    public List<Demand> pageQueryQuit(int page, int size){
        List<Demand> Demand = demandMapper.pageQueryQuit(page, size);
        return Demand;
    }

    public List<Demand> pageQueryFinish(int page, int size){
        List<Demand> Demand = demandMapper.pageQueryFinish(page, size);
        return Demand;
    }

    public List<Demand> pageQueryCrosspond(int page, int size, String bgProject) {
        List<Demand> Demand = demandMapper.pageQueryCrosspond(page, size, bgProject);
        return Demand;
    }

    public int getDemandCounts(String bgProject, int state) {
        return demandMapper.getDemandCounts(bgProject,state);
    }

    public List<Demand> getDemand(String bgProject, int state,int pageStart, int pageSize) {
        return demandMapper.getDemand(bgProject,state,pageStart,pageSize);
    }

}
